Skip to content

docs: clarify X3DH primitive interfaces and passive-secrecy game#3

Merged
ChristianoBraga merged 4 commits intomainfrom
minor-refinements/comments-and-cleanup
May 4, 2026
Merged

docs: clarify X3DH primitive interfaces and passive-secrecy game#3
ChristianoBraga merged 4 commits intomainfrom
minor-refinements/comments-and-cleanup

Conversation

@jinxinglim
Copy link
Copy Markdown
Contributor

@jinxinglim jinxinglim commented Apr 23, 2026

Summary

Documentation-only refinements made while reading through the X3DH-related files. Adds future-work notes to the primitive interfaces (KEM, AEAD), documents a notation convention in X3DH.lean, and expands explanations in the passive-secrecy game file.

No code/theorem changes — only comments, doc headers, and one cosmetic subscript fix.

Files changed

PQXDHLean/KEM.lean

  • Document current scope: deterministic encaps/decaps, no keygen (sufficient for correctness proofs)
  • Add future-work section noting what's needed for security proofs (IND-CCA, SH-CR): probabilistic encaps and a keygen operation, plus a suggested refactor pattern (separate KEMSpec alongside KEM, mirroring the KDF/KDFOracle split)

PQXDHLean/AEAD.lean

  • Document current scope: deterministic, no nonce (sufficient because X3DH uses each session key exactly once)
  • Add future-work section for security proofs: nonce parameter and probabilistic encrypt for IND-CPA
  • Cross-reference the IND-CPA + INT-CTXT assumption formalized in SecurityDefs.lean

PQXDHLean/X3DH/X3DH.lean

  • Add notation-convention block: lowercase names denote private keys (scalars in F), uppercase names denote public keys (group elements in G), subscripts / indicate owner (Alice / Bob)
  • Fix inconsistent subscript: SK_BSKᵦ (matches existing SKₐ)

PQXDHLean/X3DH/X3DHPassiveMessageSecrecy.lean

  • Expand the game description to list the 5 specific private keys sampled (ikₐ, ekₐ, ikᵦ, spkᵦ, opkᵦ) — not just "all private keys"
  • Clarify that the random key is sampled from SK (the KDF's output space)
  • Explain why the DDH challenge T is embedded at DH3 specifically: DH3 = ekₐ • SPKᵦ is the only DH value whose computation needs both secret scalars hidden in the DDH challenge; DH1/DH2/DH4 each involve at least one scalar the reduction samples itself

jinxinglim and others added 4 commits April 21, 2026 16:44
Document current scope (deterministic, no keygen) and what extensions
are needed for security proofs (probabilistic encaps, keygen).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document current scope (deterministic, no nonce) and what extensions
are needed for security proofs (nonce parameter, probabilistic encrypt).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document the lowercase/uppercase private/public key convention and
replace ASCII SK_B with SKᵦ for consistency with SKₐ.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Expand the game description to list the 5 specific private keys
  (ikₐ, ekₐ, ikᵦ, spkᵦ, opkᵦ) and note that the random key is
  sampled from SK (the KDF's output space)
- Explain why T is embedded at DH3 specifically: it's the only DH
  value whose computation needs both secret scalars hidden in the
  DDH challenge (ekₐ, spkᵦ); the other DH values each involve at
  least one scalar the reduction samples itself

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@ChristianoBraga ChristianoBraga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jinxinglim could you please answer my comment?

embeds T as DH3, queries the ROM on the resulting DH tuple to
get a session key, and passes it directly to the adversary.

Why DH3? Among the four X3DH DH values, DH3 = ekₐ • SPKᵦ is the
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you revise and elaborate this further?

Copy link
Copy Markdown
Contributor Author

@jinxinglim jinxinglim May 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. While I was reading through this file, I was wondering why do we embeds T as DH3 and not other DH. So wanted this paragraph to briefly explains why DH3 was chosen to be embedded by T. Perhaps it is not clear in my explanation. The following is an updated version of it:

"""
Why the reduction embeds T as DH3? The DDH challenge fixes two group elements (A, B) whose discrete logs are hidden from the reduction; these are installed as EKₐ and SPKᵦ in the simulated game, while ikₐ, ikᵦ, opkᵦ are sampled by the reduction itself. Of the four DH values, three can then be computed directly from the public keys and the reduction's own scalars: DH1 = ikₐ • SPKᵦ uses ikₐ, and DH2 = ekₐ • IKᵦ, DH4 = ekₐ • OPKᵦ are recovered via DH commutativity as ikᵦ • EKₐ and opkᵦ • EKₐ. DH3 = ekₐ • SPKᵦ is the only one requiring both hidden scalars — exactly the product ab • g that the challenge T encodes. So T is embedded at DH3, and the rest of the tuple is filled in honestly.
"""

WDYT? If you think providing more explanation may be even more confusing, then we can simply remove this newly added paragraph completely.

@ChristianoBraga
Copy link
Copy Markdown
Contributor

ChristianoBraga commented May 4, 2026 via email

@ChristianoBraga ChristianoBraga merged commit 8b60ace into main May 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants